<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .box{
            height: 2000px;
            border: 1px solid #000;
            /*资源路径是否正确*/
            background-image: url(./imgs/bj2.png);
            background-repeat: no-repeat;

            background-attachment: fixed;

        }

        /* 注意：如果在设置背景图的时候，盒子要设个大小*/
    </style>
</head>
<body>

    <div class="box"></div>
</body>
</html>